home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / OpenGL / OPENGL2.EXE / _SETUP.1 / index_material.spec < prev    next >
Encoding:
Text File  |  1997-10-31  |  4.5 KB  |  146 lines

  1. XXX - Not complete yet!!!
  2.  
  3. Name
  4.  
  5.     EXT_index_material
  6.  
  7. Name Strings
  8.  
  9.     GL_EXT_index_material
  10.  
  11. Version
  12.  
  13.     $Date: 1997/07/22 21:00:58 $ $Revision: 1.1 $
  14.  
  15. Number
  16.  
  17.     94
  18.  
  19. Dependencies
  20.  
  21.     None
  22.  
  23. Overview
  24.  
  25.     This extends color index lighting to include a way for the current
  26.     index to contribute to the color index produced by lighting.  This
  27.     works much like ColorMaterial does for RGBA lighting by allowing
  28.     one or more color index material properties to be attached to the
  29.     current index.
  30.  
  31.     The color index lighting formula is also modified so that the lit
  32.     color index may be bitwise shifted in order to allow greater control
  33.     when using lighting and fog together in color index mode.
  34.  
  35. New Procedures and Functions
  36.  
  37.     void IndexMaterialEXT (enum face, enum mode )
  38.  
  39. New Tokens
  40.  
  41.     Accepted by the <cap> parameter of Enable, Disable, IsEnabled,
  42.     and by the <pname> parameter of GetBooleanv, GetIntegerv,
  43.     GetFloatv, and GetDoublev:
  44.  
  45.     INDEX_MATERIAL_EXT
  46.  
  47.     Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  48.     GetFloatv, and GetDoublev:
  49.  
  50.     INDEX_MATERIAL_PARAMETER_EXT
  51.     INDEX_MATERIAL_FACE_EXT
  52.  
  53. Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
  54.  
  55.     In Section 2.13.5 "Color Index Lighting", the discussion of color
  56.     index lighting is continued after the computation of the final color
  57.     index as follows:
  58.  
  59.     Arithmetic on Color Indexes
  60.  
  61.     After a final color index is computed, the index is converted to a
  62.     fixed-point value with an unspecified number of bits to the right
  63.     of the binary point, the nearest fixed-point value is selected.
  64.     Then the fixed-point value is shifted by |index_shift| bits, left
  65.     if index_shift is > 0 and right otherwise.  In either case the
  66.     shift is zero filled.  Then the signed integer offset index_offset
  67.     is added to the index.  index_shift and index_offset are set using
  68.     the Material Command with <pname> set to INDEX_SHIFT and
  69.     INDEX_OFFSET respectively.
  70.  
  71.     Index Material
  72.  
  73.     It is possible to attach one or more color index material properties
  74.     to the current index, so that they continuously track its value.  This
  75.     behavior is enabled and disabled by calling Enable or Disable with
  76.     the symbolic constant INDEX_MATERIAL_EXT.  The command that controls
  77.     which of these modes is selected is
  78.  
  79.     void IndexMaterial (enum face, enum mode);
  80.     
  81.     <face> is one of FRONT, BACK, or FRONT_AND_BACK, indicating whether
  82.     the front material, back material, or both are affected by the current
  83.     index.  <mode> must be INDEX_OFFSET.  The replacements made to 
  84.     material properties are permanent; the replaced values remain until
  85.     changed by either sending a new index or by setting a new material
  86.     value when IndexMaterial is not currently enabled to override that
  87.     particular value.  When INDEX_MATERIAL is enabled, the indicated
  88.     parameter or parameters always track the current index.
  89.  
  90.     Section 2.13.6 "Clamping or Masking" is modified slightly as
  91.     follows: "For a color index, if lighting is enabled, the color index
  92.     is already in fixed-point, otherwise, the index is first converted
  93.     to fixed-point..."
  94.  
  95. Additions to Chapter 3 of the 1.1 Specification (Rasterization)
  96.  
  97.     None
  98.  
  99. Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
  100. and the Frame Buffer)
  101.  
  102.     None
  103.  
  104. Additions to Chapter 5 of the 1.1 Specification (Special Functions)
  105.  
  106.     None
  107.  
  108. Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
  109.  
  110.     None
  111.  
  112. Additions to the GLX Specification
  113.  
  114.     XXX - Not complete yet!!!
  115.  
  116. GLX Protocol
  117.  
  118.     XXX - Not complete yet!!!
  119.  
  120. Errors
  121.  
  122.     INVALID_ENUM is generated if IndexMaterial parameter <face> is not FRONT,
  123.     BACK, or FRONT_AND_BACK.
  124.  
  125.     INVALID_ENUM is generated if IndexMaterial parameter <mode> is not
  126.     INDEX_OFFSET.
  127.  
  128.     INVALID_OPERATION is generated if IndexMaterial is called between
  129.     execution of Begin and the corresponding execution of End.
  130.  
  131. New State
  132.  
  133.                                 Initial
  134.     Get Value                Get Command    Type    Value            Attrib
  135.     ---------                -----------    ----    -------            ------
  136.  
  137.     INDEX_MATERIAL_EXT            IsEnabled    B    False            lighting/enable
  138.     INDEX_MATERIAL_PARAMETER_EXT    GetIntegerv    Z1    INDEX_OFFSET        lighting
  139.     INDEX_MATERIAL_FACE_EXT        GetIntegerv    Z3    FRONT_AND_BACK        lighting
  140.     INDEX_SHIFT                GetMaterialfv    2 x R    0            lighting
  141.     INDEX_OFFSET            GetMaterialfv    2 x R    0            lighting
  142.  
  143. New Implementation Dependent State
  144.  
  145.     None
  146.